package me.fung.keen.common

import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf

open class DataWrapper<T>(data: T) {

    private var _data: MutableState<T> = mutableStateOf(data)
    val data by _data

    open fun update(block: T.() -> T) {
        _data.value = data.block()
    }
}
